package com.example.day04.present;

import com.example.day04.Bean;
import com.example.day04.model.MainModel;
import com.example.day04.net.CallBack;
import com.example.day04.net.ViewMian;

import java.util.List;

public class Present implements CallBack {
    ViewMian viewMian;
    MainModel mainModel;

    public Present(ViewMian viewMian) {
        this.viewMian = viewMian;
        mainModel=new MainModel();
    }

    @Override
    public void showBean(List<Bean.RecentBean> recentBeanList) {
        viewMian.showData(recentBeanList);
    }

    @Override
    public void toast(String s) {
    viewMian.showToast(s);
    }
    public void getData(){
        mainModel.getData(this);
    }
}
